package com.winning.pmph.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Table;
import java.util.LinkedHashMap;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@Table(name = "KNOWLEDGE")
public class Knowledge extends BaseEntity {

    /**
     * 删除，删除的知识放在回收站里
     */
    public final static int DELETED_YES = 1;
    /**
     * 未删除
     */
    public final static int DELETED_NO = 0;

    @TableId
    private String id;
    /**
     * 知识名称
     */
    private String name;
    /**
     * 知识库ID
     */
    private String knowledgeLibId;

    private Integer isCompose;
    /**
     * 知识库名称
     */
    @TableField(exist = false)
    private String knowledgeLibName;

    private String identify;

    /**
     * 逻辑删除标记;0：未删除，1：删除，删除的知识放在回收站里
     */
    private int deleted;

    /**
     * 知识版本
     */
    private int version;

    /**
     * 驳回原因
     */
    private String rejectReason;

    private String knowledgeUnitId;

    @TableField(exist = false)
    private int status;  // temp: 0, released: 1;
    @TableField(exist = false)
    private List<KnowledgeField> knowledgeFieldList;
    @TableField(exist = false)
    private String drugInfoLibCompany;
    @TableField(exist = false)
    private String drugInfoLibSource;
    @TableField(exist = false)
    private String ruleName;
    @TableField(exist = false) // 知识单元转知识使用
    private String knowledgeUnitName;
    @TableField(exist = false)
    private List<KnowledgeUnitField> knowledgeUnitFieldList;
    @TableField(exist = false)
    private String editor;
    @TableField(exist = false)
    private List<String> auditorList;
}
